package cn.itcast.order.feign;


import cn.itcast.order.pojo.User;
import org.springframework.stereotype.Component;

@Component
public class UserFeignClientImpl implements UserFeignClient {

    /**
     * 降级方法
     * @param id
     * @return
     */
    @Override
    public User findById(Long id) {
        User user = new User();
        user.setId(-1L);
        user.setUsername("调用失败");
        return user;
    }
}
